package com.aspose.cells;

class zvo {
   int a;
   int b;
   int c = 6;
   int d = 6;
   Object e;
   Object f;

   zvo(int var1) {
      this.a = var1;
   }

   void a(boolean[] var1, boolean[] var2, int[] var3) {
      var1[0] = (this.b & '\uffff' & 32) != 0;
      var2[0] = (this.b & '\uffff' & 64) != 0;
      var3[0] = (this.b & '\uffff' & 'ﾀ') >> 7;
   }

   boolean a() {
      return (this.b & '\uffff' & 1) == 0;
   }

   boolean b() {
      return (this.b & '\uffff' & 4) != 0;
   }

   boolean c() {
      return (this.b & '\uffff' & 8) != 0;
   }

   FilterColumn a(FilterColumnCollection var1) {
      FilterColumn var2 = new FilterColumn(var1, this.a);
      if (this.d()) {
         boolean var3 = false;
         boolean var4 = false;
         byte var5 = 0;
         boolean[] var6 = new boolean[]{var3};
         boolean[] var7 = new boolean[]{var4};
         int[] var8 = new int[]{var5};
         this.a(var6, var7, var8);
         var3 = var6[0];
         var4 = var7[0];
         int var10 = var8[0];
         Top10Filter var9 = new Top10Filter(var3, var4, var10);
         var2.setFilterType(5);
         var2.setFilter(var9);
         var9.setCriteria(this.f);
         return var2;
      } else if (this.f == null) {
         switch(this.c) {
         case 2:
            var2.d();
            break;
         case 4:
            var2.e();
         }

         return var2;
      } else {
         if (this.d == 6) {
            if (this.b()) {
               var2.b(com.aspose.cells.b.a.zr.a(this.f));
            } else {
               var2.a(this.c, this.f, false, 6, (Object)null);
            }
         } else if (this.b() && this.c()) {
            var2.b(com.aspose.cells.b.a.zr.a(this.f));
            if (this.e != null) {
               var2.b(com.aspose.cells.b.a.zr.a(this.e));
            }
         } else {
            var2.a(this.c, this.f, this.a(), this.d, this.e);
         }

         return var2;
      }
   }

   zvo(FilterColumn var1) {
      this.a = var1.getFieldIndex();
      switch(var1.getFilterType()) {
      case 1:
         CustomFilterCollection var6 = (CustomFilterCollection)var1.getFilter();
         if (!var6.getAnd()) {
            this.b |= 1;
         }

         CustomFilter var7;
         if (var6.getCount() > 0) {
            var7 = var6.get(0);
            this.c = var7.getFilterOperatorType();
            this.f = var7.getCriteria();
         }

         if (var6.getCount() > 1) {
            var7 = var6.get(1);
            this.d = var7.getFilterOperatorType();
            this.e = var7.getCriteria();
         }
      case 2:
      case 4:
      default:
         break;
      case 3:
         MultipleFilterCollection var3 = (MultipleFilterCollection)var1.getFilter();
         if (var3.getMatchBlank()) {
            this.c = 2;
            return;
         }

         Object var4;
         DateTimeGroupItem var5;
         if (var3.getCount() > 0) {
            var4 = var3.get(0);
            if (var4 instanceof DateTimeGroupItem) {
               var5 = (DateTimeGroupItem)var4;
               this.c = 5;
               this.f = CellsHelper.getDoubleFromDateTime(var5.getMinValue(), var1.c().a().a().c().n().getSettings().getDate1904());
            } else {
               this.c = 2;
               this.f = var4;
               if (var4 instanceof String) {
                  this.b |= 4;
               }
            }
         }

         if (var3.getCount() > 1) {
            this.b |= 1;
            var4 = var3.get(1);
            if (var4 instanceof DateTimeGroupItem) {
               var5 = (DateTimeGroupItem)var4;
               this.d = 5;
               this.e = CellsHelper.getDoubleFromDateTime(var5.getMinValue(), var1.c().a().a().c().n().getSettings().getDate1904());
            } else {
               this.d = 2;
               this.e = var4;
               if (var4 instanceof String) {
                  this.b |= 8;
               }
            }
         }
         break;
      case 5:
         Top10Filter var2 = (Top10Filter)var1.getFilter();
         this.b = 16;
         if (var2.isTop()) {
            this.b |= 32;
            this.c = 5;
         } else {
            this.c = 0;
         }

         if (var2.isPercent()) {
            this.b |= 64;
         }

         this.b |= var2.getItems() << 7;
         this.f = var2.getCriteria();
      }

   }

   boolean d() {
      return (this.b & '\uffff' & 16) != 0;
   }
}
